﻿create proc capmenu_loadgridvitri
@MaNhom int
as
select cast(0 as bit) as Chon,IDViTri,DienGiai from DanhMuc_ViTriMenu
Where IDViTri not in (select IDViTri from QuanTri_CapQuyenNguoiDungSuDungMenu Where MaNhomUser=@MaNhom)
union
select cast(1 as bit) as Chon,IDViTri,DienGiai  from DanhMuc_ViTriMenu
Where IDViTri in (select IDViTri from QuanTri_CapQuyenNguoiDungSuDungMenu Where MaNhomUser=@MaNhom)
